function Matrix (number)
{
	var data = [];
	for (var i = 0; i < number; i ++)
	{
		var t = [];
		for (var j = 0; j < number; j ++) t [j] = -1;
		data.push (t);
	}

	this.setValue = function (row, column, value)
	{
		data [row-1][column-1] = value;
	}

	this.getValue = function (row, column)
	{
		return data [row-1][column-1];
	}

	this.toString = function ()
	{
		var s = "";
		for (var i = 0; i < number; i ++)
		{
			for (var j = 0; j < number; j ++)
			{
				if (data [i][j] != -1)
				{
					if (s.length > 0) s += ";";
						s += "(" + i + "," + j + ")=" + data[i][j];
				}
			}
		}
		return s;
	}
}
